//
//  UCWMSParameter.m
//  6789
//
//  Created by 北京国泰北斗科技有限公司 on 16/7/5.
//  Copyright © 2016年 北京国泰北斗科技有限公司. All rights reserved.
//

#import "UCWMSParameter.h"

@implementation UCWMSParameter


- (NSInteger)buffer{

    if (_buffer == 0) {
        _buffer = 50;
    }
    return _buffer;
}


- (NSString *)layerKey{

    if (_layerKey == nil) {
        
        _layerKey = [NSString stringWithFormat:@"%@-%@",self.name,self.filter];
    }
    
    return _layerKey;
}



- (NSString *)stringUTF8:(NSString *)string{
    
    NSString *outputStr = (NSString *)
    CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
                                                              (CFStringRef)string,
                                                              NULL,
                                                              (CFStringRef)@"!*'();:@&=+$,/?%#[]",
                                                              kCFStringEncodingUTF8));
    return outputStr;
}
@end
